package com.workcell.workdata.im.model.vo;

import com.workcell.workdata.im.entity.Department;
import com.workcell.workdata.im.entity.DepartmentMember;
import com.workcell.workdata.im.entity.Organization;

import java.util.List;

public class OrganizationVO {

    private Long id;

    private String name;

    private List<Department> departmentList;

    private List<DepartmentMember> memberList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Department> getDepartmentList() {
        return departmentList;
    }

    public void setDepartmentList(List<Department> departmentList) {
        this.departmentList = departmentList;
    }

    public List<DepartmentMember> getMemberList() {
        return memberList;
    }

    public void setMemberList(List<DepartmentMember> memberList) {
        this.memberList = memberList;
    }

    public static OrganizationVO of(Organization organization){
        if (organization == null){
            return null;
        }
        OrganizationVO vo = new OrganizationVO();
        vo.name = organization.getName();
        vo.id = organization.getId();
        return vo;
    }
}
